import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

// 全局引入http请求方法
import {
	http
} from "common/http.js"
Vue.prototype.$http = http

// 导入socket
import io from 'common/uni-socket.io.js'

Vue.prototype.socket = io('http://39.108.166.29:8000', {
	query: {},
	transports: ['websocket', 'polling'],
	timeout: 4000
})

// 导入vuex仓库
import store from '@/store/store.js'

uni.$showMsg = function(title = '数据请求失败', icon = 'none', duration = 1500) {
	uni.showToast({
		title,
		icon,
		duration
	})
}


Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif